using Rsd.Dudu;
using Rsd.Dudu.ModelProvider;
using Rsd.Dudu.ORM;
using Rsd.Faith.Core;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;

namespace Rsd.Faith.Models
{
    /// <summary>
    /// 
    /// </summary>
    [Table("book_分账户明细", "book__fen_hu_zhang", "id")]
    [Serializable]
    public class BookFenHuZhangModel : Rsd.Faith.Core.ModelBase
    {

        /// <summary>
        /// 账户编号
        /// </summary>
        [TableIndex(TableIndexType.Unique, TableIndexUsing.BTree)]
        [StringType("zhang_hu_bian_hao", "账户编号", 20, 50)]
        [DisplayName("账户编号")]
        public string ZhangHuBianHao { get; set; }
        /// <summary>
        /// 建账日期
        /// </summary>
        [DateTimeFormat("yyyy-MM-dd")]
        [DateTimeType("jian_zhang_ri_qi", "建账日期", 22,3)]
        [DisplayName("建账日期")]
        public DateTime JianZhangRiQi { get; set; }
        /// <summary>
        /// 所属周期
        /// </summary>
        [StringType("suo_shu_qi", "所属期", 23, 20)]
        [DisplayName("所属期")]
        public string SuoShuQi { get; set; }

        /// <summary>
        /// 小区编号
        /// </summary>
        [TableIndex(TableIndexType.Normal, TableIndexUsing.BTree)]
        [StringType("xiao_qu_bian_hao", "小区编号", 24, 20)]
        [DisplayName("小区编号")]
        public string XiaoQuBianHao { get; set; }

        /// <summary>
        /// 房屋编号
        /// </summary>
        [TableIndex(TableIndexType.Unique, TableIndexUsing.BTree)]
        [StringType("fang_wu_bian_hao", "房屋编号", 25, 50)]
        [DisplayName("房屋编号")]
        public string FangWuBianHao { get; set; }

        /// <summary>
        /// 缴存金额
        /// </summary>
        [NumericType("jiao_cun_jin_e", "缴存金额", 26, 20, 2)]
        [DisplayName("缴存金额")]
        public decimal JiaoCunJinE { get; set; }

        /// <summary>
        /// 增值收益金额
        /// </summary>
        [NumericType("shou_yi_jin_e", "增值收益金额", 27, 20, 2)]
        [DisplayName("增值收益金额")]
        public decimal ShouYiJinE { get; set; }

        /// <summary>
        /// 已使用金额
        /// </summary>
        [NumericType("shi_yong_jin_e", "已使用金额", 28, 20, 2)]
        [DisplayName("已使用金额")]
        public decimal ShiYongJinE { get; set; }

        
        /// <summary>
        /// 当前最新余额=缴存金额+增值收益金额-已使用金额
        [NumericType("yu_e", "余额", 30, 20, 2)]
        [DisplayName("余额")]
        public decimal YuE { get; set; }
  
        /// <summary>
        /// 状态：正常,自管,退伙
        /// </summary>
        [StringType("zhuang_tai", "状态", 32, 10, "DG")]
        [DisplayName("状态（正常,自管,退伙）")]
        public ZhuangHuZhuangTai ZhuangTai { get; set; }

      
        
        /// <summary>
        /// 
        /// </summary>
        public BookFenHuZhangModel()
        { }

    }
}
